package com.tn.jinq.util;

/**
 * Utility methods relating to objects.
 */
public class ObjectUtils
{
  /**
   * Returns <code>true</code> if <code>object1</code> and <code>object2</code> are <i>equal</i> or both
   * <code>null</code>; otherwise <code>false</code>
   */
  public static boolean areEqual(Object object1, Object object2)
  {
    return (object1 == null && object2 == null) || (object1 != null && object1.equals(object2));
  }
}
